package com.xmkj.bearbiz.member.adaper;

import android.content.Context;

import com.common.BearBean.OrderListInfo;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.bearbiz.R;

import java.util.List;

/**
 * Create by leo
 * 创建日期：2018/7/26
 * 描述：
 */

public class UserOrderAdapter extends CommonAdapter<OrderListInfo> {
    public UserOrderAdapter(Context context, List<OrderListInfo> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, OrderListInfo item, int position) {
        holder.setText(R.id.tv_date,item.date);
        holder.setText(R.id.tv_order_num,item.sale_num);
        holder.setText(R.id.tv_jian,item.amount);
        holder.setText(R.id.tv_money,item.total_money);
        holder.setText(R.id.tv_jifen,item.give_score);
        holder.setText(R.id.tv_dikou,item.deduction_score);
    }

    @Override
    protected int getItemViewLayoutId(int position, OrderListInfo item) {
        return R.layout.item_user_order;
    }
}
